
<template>
  <div id="app">
    <h1>vue + ts</h1>
    <hr>
    <ClassComponent p1="类组件传递props"></ClassComponent>
    <hr>
    <ExtendComponent p1="扩展式组件传递props"></ExtendComponent>
    <hr>
    <FunctionComponent p1="函数式组件可以接收props" />
  </div>
</template>
<script lang="ts">
import Vue from 'vue';
import { Component } from 'vue-property-decorator'
import ClassComponent from './components/ClassComponent.vue'
import ExtendComponent from './components/ExtendComponent.vue'
import FunctionComponent from './components/FunctionComponent.vue'
@Component ({ // 注入
  components: {
    ClassComponent, ExtendComponent, FunctionComponent
  }
})
export default class App extends Vue {
  show(arg: number):void{
    alert('app show' + arg)
  }
}
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
